﻿using UnityEngine;
using System.Collections;

public class CapsuleController : MonoBehaviour {
	private CharacterController chrController;

	// Use this for initialization
	void Start () {
	chrController = GetComponent<CharacterController>();
	}
	
	// Update is called once per frame
	void Update () {
	float hor = Input.GetAxis("Horizontal");
		float ver = Input.GetAxis("Vertical");

		Vector3 dir = new Vector3(hor,0,ver);
		//不带重力的移动
//		chrController.Move(dir*Time.deltaTime);
		//带重力的移动
		chrController.SimpleMove(dir*Time.deltaTime*100);
	}
}
